import { Entity, PrimaryGeneratedColumn, Column, BaseEntity, CreateDateColumn } from "typeorm";

@Entity()
export class RoomContact extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: string;

  @Column({ default: '' })
  roomId: string;

  @Column({ type: 'longtext' })
  roomName: string;

  @Column({ default: '' })
  contactId: string;

  @Column()
  contactName: string;

  @Column({ default: false })
  isFriend: boolean;
  /**
   * 手机号
   */
  @Column({ default: false })
  phone: string;
  /**
   * 微信
   */
  @Column({ default: false, nullable: true })
  weixin: string;
  /**
   * 性别
   */
  @Column({ default: false })
  gender: string;

  @Column({ default: '', unique: false, nullable: true })
  province: string;

  @Column({ default: '', nullable: true })
  city: string;

  @Column({ default: '', nullable: true })
  avatar: string;

  @CreateDateColumn({ type: 'timestamp' })
  createDate: Date;
}